<?php
require_once("config.inc.php");
require_once("weibo.class.php");
header( "Content-Type:text/html; charset=utf-8" );
$wb = new weibo(APP_KEY, SECRET_KEY);
$wb->setUser( USER_NAME , USER_PASS );

if( $fi = $wb->followers_ids( USER_UIID , 50) )
{
	//print_r($fi);
	foreach( $fi['ids'] as $item )
	{
		$relation = $wb->friendships_show( $item );
		if( empty($relation['source']['following'] ) ) {
			$wb->friendships_create( $item );
			echo "Following " . $relation['target']['screen_name'] . "!";
			$wb->direct_messages( $item , "用户" . $relation['target']['screen_name'] . "，感谢您对时间助手的关注！" . $option_form['wnl'] );
		}
	}
}

?>